package com.cssy.xxkj.logic.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.cssy.xxkj.logic.dao.LogicProdDispatchingDetailItemDAO;
import com.cssy.xxkj.logic.entity.LogicProductionDispatchingDetailDO;
import com.cssy.xxkj.logic.entity.LogicProductionDispatchingDetailItemDO;
import com.plat.helper.SearchConditions;

/**
 * 数据访问对象实现类
 * @since 2014-09-28
 */
public class LogicProdDispatchingDetailItemDAOImpl extends SqlMapClientDaoSupport implements LogicProdDispatchingDetailItemDAO {


	@Override
	public String insertLogicProductionDispatchingDetailItemDO(
			LogicProductionDispatchingDetailItemDO logicProductionDispatchingDetailItemDO) {
		Object id = getSqlMapClientTemplate().insert("LogicProductionDispatchingDetailItem.insert", logicProductionDispatchingDetailItemDO);
        return (String) id;
	}

	@Override
	public Integer countLogicProductionDispatchingDetailItemDOByExample(
			LogicProductionDispatchingDetailItemDO logicProductionDispatchingDetailItemDO) {
		Integer count = (Integer) getSqlMapClientTemplate().queryForObject("LogicProductionDispatchingDetailItem.countByDOExample", logicProductionDispatchingDetailItemDO);
        return count;
	}

	@Override
	public Integer updateLogicProductionDispatchingDetailItemDO(
			LogicProductionDispatchingDetailItemDO logicProductionDispatchingDetailItemDO) {
		int result = getSqlMapClientTemplate().update("LogicProductionDispatchingDetailItem.update", logicProductionDispatchingDetailItemDO);
        return result;
	}

	@Override
	public List<LogicProductionDispatchingDetailItemDO> findListByExample(
			LogicProductionDispatchingDetailItemDO logicProductionDispatchingDetailItemDO) {
		List<LogicProductionDispatchingDetailItemDO> list = getSqlMapClientTemplate().queryForList("LogicProductionDispatchingDetailItem.findListByDO", logicProductionDispatchingDetailItemDO);
	    return list;
	}
	
	@Override
	public List<LogicProductionDispatchingDetailItemDO> findListByMap(
			Map<String, Object> paramMap) {
		List<LogicProductionDispatchingDetailItemDO> itemList = getSqlMapClientTemplate().queryForList("LogicProductionDispatchingDetailItem_ex.findListByMap", paramMap);
		return itemList; 
	}

	@Override
	public LogicProductionDispatchingDetailItemDO findLogicProductionDispatchingDetailItemDOByPrimaryKey(
			String id) {
		LogicProductionDispatchingDetailItemDO logicProductionDispatchingDetailDO = (LogicProductionDispatchingDetailItemDO) getSqlMapClientTemplate().queryForObject("LogicProductionDispatchingDetailItem.findByPrimaryKey", id);
        return logicProductionDispatchingDetailDO;
	}

	@Override
	public Integer deleteLogicProductionDispatchingDetailItemDOByPrimaryKey(
			String id) {
		Integer rows = (Integer) getSqlMapClientTemplate().delete("LogicProductionDispatchingDetailItem.deleteByPrimaryKey", id);
        return rows;
	}

	@Override
	public Integer deleteDispatId(String id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<LogicProductionDispatchingDetailItemDO> find(
			SearchConditions scs) throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Integer count(SearchConditions scs) throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Integer deleteBizRemoved(String id) throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

}